<jsp:useBean id="statistics" class="dasregistry.statisticsBean"/>


<% String title="DAS registry statistics";
   String header = title;
%>


<%@ include file="sangerheader.jsp" %>


<div id="main">
<h2>Statistics for DAS registration server</h2>


<p>


<table width="550" border="0">
<tr><td>
<h2> Registered servers </h2>
<% 
   String[] institutions = statistics.getInstitutions();
   String[] countries    = statistics.getCountries();
%>
<table border="0">
<tr class="violet2">
	<td># servers:</td>
	<td><%=statistics.getTotalNumberServers()%></td>
</tr>
<tr><td># servers with types</td><td><%=statistics.getSourcesWithTypes()%></td>
</tr>
<tr><td># of types</td><td><%=statistics.getTypesCount() %></td></tr>
<tr class="violet3">
	<td># of institutions:</td>
	<td><%= institutions.length %></td>
</tr>
<tr class="violet2">
	<td># of countries</td>
	<td><%= countries.length %></td>
</tr>
</table>



<p/>

<p>


<h2> Institutions </h2>
<table border="0">
 <% 
  for (int i = 0 ; i< institutions.length ; i++ ) {
  String institution = institutions[i];
	if ( i%2 != 0 ) { 
		  	 %>
	    		 <tr class="violet2" valign="top">
	    		 <%
		        }
		        else { 
			 %>
			 <tr class="violet3"  valign="top">
			 <%
			}

  %>
  <td>
  <%=institution%> 
  </td></tr>
  <%
  }
  %>
</table>



<p>


<h2> Countries </h2>
<table border="0">
 <% 
  for (int i = 0 ; i< countries.length ; i++ ) {
  String country = countries[i];
	if ( i%2 != 0 ) { 
		  	 %>
	    		 <tr class="violet2" valign="top">
	    		 <%
		        }
		        else { 
			 %>
			 <tr class="violet3"  valign="top">
			 <%
			}

  %>
  <td>
  <%=country%> 
  </td></tr>
  <%
  }
  %>
</table>


<p/>




<%@ include file="sangertablestart.jsp" %>
<table border="0"><tr><td>

<!-- statistics on servers -->
<%@taglib uri='/WEB-INF/cewolf.tld' prefix='cewolf' %>
     
<jsp:useBean id="latestNumberServerStat" class="org.biojava.services.das.cewolf.LatestNumberDasSourceStat" scope="page"/>

<cewolf:chart 
    id="timeChart" 
    title="registered DAS servers at least a valid response this month over time" 
    type="timeseries" 
    xaxislabel="time" 
    yaxislabel="number of valid servers"
    >
    <cewolf:data>
        <cewolf:producer id="latestNumberServerStat" usecache="false"/><!-- changed by jw to improve preformance ?? -->
    </cewolf:data>
</cewolf:chart>

<cewolf:img chartid="timeChart" renderer="cewolf" width="400" height="300"/>
</td></tr></table>

<%@ include file="sangertableend.jsp" %>

</div>
<%@ include file="sangerfooter.jsp" %>



